package com.aaa.rent.controller.api;

import com.aaa.rent.service.CommentService;
import com.aaa.vo.CarCommentVo;
import com.aaa.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * #Description 车辆评论
 * @author 荆豪峰
 * @version 1.0
 * #Date: 2023/3/1 19:59
 */
@Api(value = "rent/comment", tags = {"#Description 车辆评论 #Date: 2023/3/1 19:59"})
@RestController
@RequestMapping("rent/comment")
public class ApiCommentController {
    @Autowired
    private CommentService commentService;
    /**
     * #Description 车辆评论查询
     * @param currentPage
 * @param pageSize
 * @param carCommentVo
     * @return com.aaa.vo.Result
     * @author 荆豪峰
     * #Date 2023/3/2
     */
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", dataType = "int", name = "currentPage", value = "", required = true),
            @ApiImplicitParam(paramType = "query", dataType = "int", name = "pageSize", value = "", required = true),
            @ApiImplicitParam(paramType = "body", dataType = "CarCommentVo", name = "carCommentVo", value = "", required = true)
    })
    @ApiOperation(value = "#Description 车辆评论查询 #Date 2023/3/2", notes = "#Description 车辆评论查询 #Date 2023/3/2", httpMethod = "POST")
    @PostMapping("list")
    public Result list(Integer currentPage, Integer pageSize, @RequestBody CarCommentVo carCommentVo){
        return commentService.list(currentPage,pageSize,carCommentVo);
    }
}
